<?php include 'connect/connect.php'; ?>
<?php 
$page='logins';
require_once 'header.php'; ?>
<div id="content"><div>
    <h3>Create an account for free</h3><p > (If you don't have one)</p>
    <?php
    if (isset($_GET['status'])) {
        $status = $_GET['status'];
        if ($status == "wrong") {
            ?>
            <p class="error">Registration was not successful!</p>
            <?php
        } else if ($status == "wrongu") {
            ?>
            <p class="error">Username has already being taken!</p>
            <?php
        } else if ($status == "wrongp") {
            ?>
            <p class="error">Your passwords don't match!</p>
            <?php
        }
    }
    ?>
    <script type="text/javascript">
        jQuery(document).ready(function(){
            jQuery("#signup_form").validationEngine();
        });

    </script>

    <form method="post" action="signup_action.php" id="signup_form">
        <table>
            <tr><td>username: </td><td><input type="text" class="validate[required] wide" name="username" id="username"/></td></tr>
            <tr><td>Password: </td><td><input type="password" class="validate[required] wide" name="password" id="password" /></td></tr>
            <tr><td>Confirm Password: </td><td><input type="password" class="validate[required] wide" name="confirm_password" id="confirm_password" /></td></tr>
            <tr><td></td><td><input type="submit" value="submit" /></td></tr>
        </table>
    </form>	

    <p>If you already have an account <a href="logins.php">Login here</a></p>
    <?php require_once('footer.php'); ?>